go to previous page   go to home page   go to next page hear noise

Answer:

For languages like C, the answer is "yes".


Program Execution

Executing Machine Language

Once the source program has been translated into machine code (the executable program), the machine code can be directly executed by the processor. This is like the light bulb's processor directly executing its machine code. The source program is only a means to create the machine code.

For commercial software like games and word processors, the machine code is the product that is sold to the user. The user does not get a copy of the source program.

A student learning programming, or a programmer developing an application, creates source programs and translates them (with a compiler) into executable programs.

The above is what goes on with languages like Ada, Pascal, C, C++, FORTRAN and others. Java adds a few more steps, which will be discussed in the next chapter.


QUESTION 11:

Say that you have a source program written in C. You copy the program onto the hard disk of a Pentium-based computer and also copy it onto the hard disk of an Motorola-based computer. What must you do so both computers can execute the program?